a * algorithm in artificial intelligence example